<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}/data_style.css" />
    <title>Responses</title>
  </head>
  <body>
    <div class="data">
      <h1>Responses</h1>
      <ul>
	<li>Page hit count: {{ hit_count }}</li>
	<li>Number of responses: {{ response_count }}</li>
	<li>Response rate: {{ ratio }}%</li>
	<li>Average drink rating: {{ avg }}</li>
      </ul>
      <table>
	<tr>
	  <th>Drink</th>
	  <th>Drink rating</th>
	  <th>Drink comment</th>
	</tr>
	{% for response in surveys %}
	<tr>
	  <td>{{ response.drink }}</td>
	  <td>{{ response.rating }}</td>
	  <td>{{ response.drink_comment }}</td>
	</tr>
	{% endfor %}
      </table>
      <table>
	<tr>
	  <th>Music</th>
	</tr>
	{% for response in surveys %}
	{% if response.music %}
	<tr>
	  <td>{{ response.music }}</td>
	</tr>
	{% endif %}
	{% endfor %}
      </table>
      <table>
	<tr>
	  <th>What to change</th>
	</tr>
	{% for response in surveys %}
	{% if response.change %}
	<tr>
	  <td>{{ response.change }}</td>
	</tr>
	{% endif %}
	{% endfor %}
      </table>
      <table>
	<tr>
	  <th>General comment</th>
	</tr>
	{% for response in surveys %}
	{% if response.comment %}
	<tr>
	  <td>{{ response.comment }}</td>
	</tr>
	{% endif %}
	{% endfor %}
      </table>
    </div>
  </body>
</html>
